﻿using System;
using System.Collections.Generic;
using System.Text;

namespace csharpcore7_ch3_AbstractClass
{
    public abstract class Asset
    { 
        public abstract decimal NetValue { get; }
    }
    public class Stock : Asset
    {
        public long SharesOwned;
        public decimal CurrentPrice;
        //像虚方法一样覆盖属性
        public override decimal NetValue => CurrentPrice * SharesOwned;
    }
    class Chapt3_2_4AbstractClassAndAbstractMember
    {
    }
}
